<template>
  <div id="app">
    <v-form :mode="formValidate" :rules="ruleValidate">
      <v-form-item label="用户名" prop="name">
        <v-input v-model="formValidate.name"></v-input>
      </v-form-item>
      <v-form-item label="邮箱" prop="name">
        <v-input v-model="formValidate.email"></v-input>
      </v-form-item>
    </v-form>
  </div>
</template>

<script>
// import vButton from "@/components/button.vue";
import vForm from "@/components/com/form.vue";
import vFormItem from "@/components/com/form-item.vue";
import vInput from "@/components/com/input.vue";
export default {
  name: "App",
  data() {
    const formValidate = {
      name: "",
      email: "",
    };
    const ruleValidate = {
      name: [{ require: true, message: "用户名不能为空", trigger: "blur" }],
      email: [
        { require: true, message: "邮箱不能为空", trigger: "blur" },
        { type: "email", message: "邮箱格式不正确", trigger: "blur" },
      ],
    };
    return { formValidate, ruleValidate };
  },
  components: {
    vForm,
    vFormItem,
    vInput,
    // vButton,
  },
  methods: {},
};
</script>

<style>
</style>
